<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>模拟器配置管理 | 模拟器配置列表</title>
<@fm.header />
<script type="text/javascript" src="/resources/js/easyui/jquery.edatagrid.js"></script>
<style type="text/css">
body {
	font: 12px/20px "微软雅黑", "宋体", Arial, sans-serif, Verdana, Tahoma;
	padding: 0;
	margin: 0;
}
.layout-split-proxy-h{
	position:absolute;
	width:2px;
	background:#888;
	font-size:1px;
	cursor:e-resize;
	display:none;
	z-index:5;
}
.layout-split-north{
	border-bottom:5px solid #efefef;
}
.layout-split-south{
	border-top:5px solid #efefef;
}
.layout-split-east{
	border-left:0px solid #efefef;
}
.layout-split-west{
	border-right:0px solid #efefef;
}
a:link {
 text-decoration: none;
}
a:visited {
 text-decoration: none;
}
a:hover {
 text-decoration: underline;
}
a:active {
 text-decoration: none;
}
.cs-north {
	height:40px;
	overflow:hidden;
}
.cs-north-bg {
	width: 100%;
	height: 100%;
	background: url(/resources/js/easyui/themes/bootstrap/images/header_bg.png) repeat-x;
}
.cs-north-logo {
	height: 30px;
	margin: 10px 0px 20px 5px;
	display: inline-block;
	color:#0E2D5F;
	font-size:20px;
	font-weight:bold;
	text-decoration:none;
}
.cs-north-info {
	position: absolute;
	color: #777;
	top: 10px;
	right: 30px;
	display: inline-block;
}
</style>
</head>
<body class="cmp-list-body">
	<div id="tb" style="padding:3px">
    	<span>mark:</span>
		<input id="mark" class="easyui-textbox" style="width: 300px;" name="mark"/>
		<span>apk是否开启:</span>
	    <select class="easyui-combobox" id="apkIsDelete" panelHeight="auto" style="width:155px" >
	         <option value="" selected>请选择</option>
            <option value="0">启用</option>
        	<option value="1">废弃</option>
        </select>
		<span>省份:</span> <input id="provinceId" class="easyui-combobox" style="width: 155px;" name="provinceId" data-options="
						url:'/province/getAllProvinces',
						method:'get',
						valueField:'id',
						textField:'provinceName'" />
    	<a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a> 
		
	    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#tt').edatagrid('saveRow')">保存</a>
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#tt').edatagrid('cancelRow')">取消</a>
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:del()">删除</a>
	</div>
	<div id="mainPanle" region="center" border="false">
		<table id="tt" class="easyui-datagrid" title="省份配置" iconCls="icon-save" toolbar="#tb" rownumbers="true" idField="id" 
			url="/channelapk/provinceconfigList?json" singleSelect="true"  pagination="true"  fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]" > 
		    <thead>		
		    	<tr>    
		    		<th align="center" width="15%" field="apkName">apkname</th>
		        	<th align="center" width="60%" field="mark">应用标识</th>
		            <th align="center" width="5%" field="provinceid" formatter="getProvinceName">省份</th>
		            <th align="center" width="5%" field="provinceRate" editor="{type:'validatebox'}">省份优先级</th>
		            <th align="center" width="5%" field="apkIsDelete" formatter="formatterType">状态</th>
		        	<th align="center" width="15%" field="createTime">创建时间</th>
		        	<th align="center" width="15%" field="modifyTime">修改时间</th>
		        </tr>
		    </thead>   
		</table>
	</div>
	
	<script type="text/javascript" src="/resources/js/channelapk/provinceconfigList.js"></script>
</body>

<script>

	function getProvinceName(value){
		var provinceName;
		$.ajax({
			url : '/province/getProvinceName',
			data : {"provinceId":value},
			type : 'GET',
			async : false,
			success : function(data) {
				provinceName = data;
			}
		});
		return provinceName;
	}
</script>

</html>